package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_store_model table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_store_model"
 */

public abstract class BaseStoreModel  implements Serializable {

	public static String REF = "StoreModel";
	public static String PROP_DEFAULT_MODEL = "defaultModel";
	public static String PROP_MODEL_NAME = "modelName";
	public static String PROP_MODEL_IMG = "modelImg";
	public static String PROP_ID = "id";
	public static String PROP_PATH = "path";


	// constructors
	public BaseStoreModel () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseStoreModel (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseStoreModel (
		java.lang.Long id,
		java.lang.String modelName,
		java.lang.String path) {

		this.setId(id);
		this.setModelName(modelName);
		this.setPath(path);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
	private java.lang.String modelName;
	private java.lang.String path;
	private java.lang.String modelImg;
	private java.lang.Boolean defaultModel;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="model_id"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: model_name
	 */
	public java.lang.String getModelName () {
		return modelName;
	}

	/**
	 * Set the value related to the column: model_name
	 * @param modelName the model_name value
	 */
	public void setModelName (java.lang.String modelName) {
		this.modelName = modelName;
	}


	/**
	 * Return the value associated with the column: path
	 */
	public java.lang.String getPath () {
		return path;
	}

	/**
	 * Set the value related to the column: path
	 * @param path the path value
	 */
	public void setPath (java.lang.String path) {
		this.path = path;
	}


	/**
	 * Return the value associated with the column: model_img
	 */
	public java.lang.String getModelImg () {
		return modelImg;
	}

	/**
	 * Set the value related to the column: model_img
	 * @param modelImg the model_img value
	 */
	public void setModelImg (java.lang.String modelImg) {
		this.modelImg = modelImg;
	}


	/**
	 * Return the value associated with the column: is_defaultModel
	 */
	public java.lang.Boolean getDefaultModel () {
		return defaultModel;
	}

	/**
	 * Set the value related to the column: is_defaultModel
	 * @param defaultModel the is_defaultModel value
	 */
	public void setDefaultModel (java.lang.Boolean defaultModel) {
		this.defaultModel = defaultModel;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.StoreModel)) return false;
		else {
			com.jspgou.cms.entity.StoreModel storeModel = (com.jspgou.cms.entity.StoreModel) obj;
			if (null == this.getId() || null == storeModel.getId()) return false;
			else return (this.getId().equals(storeModel.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}